Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ


Displaying Rendered β€’ View raw β€’ Download

.specify/extensions/git/README.md b2a8377bbb01a5875eba4b12f6f1c7e7d9e60a91 (b2a8377b) Text, 4.34 KB

Git Branching Workflow Extension

Git repository initialization, feature branch creation, numbering (sequential/timestamp), validation, remote detection, and auto-commit for Spec Kit.

Overview

This extension provides Git operations as an optional, self-contained module. It manages:

β€’ Repository initialization with configurable commit messages
β€’ Feature branch creation with sequential (T383838001-feature-name) or timestamp (T38383820260319-143022-feature-name) numbering
β€’ Branch validation to ensure branches follow naming conventions
β€’ Git remote detection for GitHub integration (e.g., issue creation)
β€’ Auto-commit after core commands (configurable per-command with custom messages)

Commands

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Command β”‚ Description β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ T383838speckit.git.initialize β”‚ Initialize a Git repository with a configurable commit message β”‚
β”‚ T383838speckit.git.feature β”‚ Create a feature branch with sequential or timestamp numbering β”‚
β”‚ T383838speckit.git.validate β”‚ Validate current branch follows feature branch naming conventions β”‚
β”‚ T383838speckit.git.remote β”‚ Detect Git remote URL for GitHub integration β”‚
β”‚ T383838speckit.git.commit β”‚ Auto-commit changes (configurable per-command enable/disable and messa… β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Hooks

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Event β”‚ Command β”‚ Optional β”‚ Description β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ T383838before_constitution β”‚ T383838speckit.git.initialize β”‚ No β”‚ Init git repo before constitution β”‚
β”‚ T383838before_specify β”‚ T383838speckit.git.feature β”‚ No β”‚ Create feature branch before specifi… β”‚
β”‚ T383838before_clarify β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Commit outstanding changes before cl… β”‚
β”‚ T383838before_plan β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Commit outstanding changes before pl… β”‚
β”‚ T383838before_tasks β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Commit outstanding changes before ta… β”‚
β”‚ T383838before_implement β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Commit outstanding changes before im… β”‚
β”‚ T383838before_checklist β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Commit outstanding changes before ch… β”‚
β”‚ T383838before_analyze β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Commit outstanding changes before an… β”‚
β”‚ T383838before_taskstoissues β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Commit outstanding changes before is… β”‚
β”‚ T383838after_constitution β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after constitution update β”‚
β”‚ T383838after_specify β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after specification β”‚
β”‚ T383838after_clarify β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after clarification β”‚
β”‚ T383838after_plan β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after planning β”‚
β”‚ T383838after_tasks β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after task generation β”‚
β”‚ T383838after_implement β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after implementation β”‚
β”‚ T383838after_checklist β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after checklist β”‚
β”‚ T383838after_analyze β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after analysis β”‚
β”‚ T383838after_taskstoissues β”‚ T383838speckit.git.commit β”‚ Yes β”‚ Auto-commit after issue sync β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Configuration

Configuration is stored in T383838.specify/extensions/git/git-config.yml:

T282828
T8b949e# Branch numbering strategy: "sequential" or "timestamp"
Tff7b72branch_numberingTb4b4b4: Ta5d6ffsequential

T8b949e# Custom commit message for git init
Tff7b72init_commit_messageTb4b4b4: Ta5d6ff"Ta5d6ff[SpecTe6edf3 Ta5d6ffKit]Te6edf3 Ta5d6ffInitialTe6edf3 Ta5d6ffcommitTa5d6ff"

T8b949e# Auto-commit per command (all disabled by default)
T8b949e# Example: enable auto-commit after specify
Tff7b72auto_commitTb4b4b4:
Tff7b72defaultTb4b4b4: Ta5d6fffalse
Tff7b72after_specifyTb4b4b4:
Tff7b72enabledTb4b4b4: Ta5d6fftrue
Tff7b72messageTb4b4b4: Ta5d6ff"Ta5d6ff[SpecTe6edf3 Ta5d6ffKit]Te6edf3 Ta5d6ffAddTe6edf3 Ta5d6ffspecificationTa5d6ff"


Installation

T282828
T8b949e# Install the bundled git extension (no network required)
specify extension add git


Disabling

T282828
T8b949e# Disable the git extension (spec creation continues without branching)
specify extension disable git

T8b949e# Re-enable it
specify extension Tffa657enable git


Graceful Degradation

When Git is not installed or the directory is not a Git repository:
β€’ Spec directories are still created under T383838specs/
β€’ Branch creation is skipped with a warning
β€’ Branch validation is skipped with a warning
β€’ Remote detection returns empty results

Scripts

The extension bundles cross-platform scripts:

β€’ T383838scripts/bash/create-new-feature.sh β€” Bash implementation
β€’ T383838scripts/bash/git-common.sh β€” Shared Git utilities (Bash)
β€’ T383838scripts/powershell/create-new-feature.ps1 β€” PowerShell implementation
β€’ T383838scripts/powershell/git-common.ps1 β€” Shared Git utilities (PowerShell)

Served by rngit 1.5.2 - Generated in 0.06s